{capture name="tiny_url"}{get_scheme()}://{if $domain_url}{$domain_url->getDomain()}{else}{#RewriteHost#}{/if}/{$url->getKeyword()}{/capture}
<h1>Edit URL</h1>
<form action="" method="post">
	<div class="longer-form-field">
		<label>Domain name:</label>
		<select name="domain_name">
			<option value="">{#RewriteHost#} (default)</option>
			{foreach $domains as $domain}
				<option value="{$domain.id}"{if $domain_url && $domain_url->getID() == $domain.id} selected="selected"{/if}>{$domain.domain}</option>
			{/foreach}
		</select>
	</div>
	<div class="longer-form-field">
		<label>URL set container:</label>
		<select name="url_set_container">
			<option value="">None</option>
			{foreach $url_sets as $url_set}
				<option value="{$url_set.id}"{if $url_set_url && $url_set_url->getID() == $url_set.id} selected="selected"{/if}>{$url_set.group_name}</option>
			{/foreach}
		</select><br /><br />
	</div>
	<div class="longer-form-field">
		<label>Current keyword:</label>
		<b><acronym title="{$url->getURL()|escape}">{$url->getKeyword()}</acronym></b>
	</div>
	<div class="longer-form-field">
		<label>Tiny URL:</label>
		<b><a href="{$smarty.capture.tiny_url}" rel="external" class="no-underline">{$smarty.capture.tiny_url}</a></b>
	</div>
	<script type="text/javascript">
		document.write(unescape("%3Cdiv class='longer-form-field'%3E\n"));
		document.write(unescape("%3Clabel%3E&nbsp;%3C/label%3E\n"));
		createCopyButton('{$smarty.capture.tiny_url}');
		document.write(unescape("%3C/div%3E\n"));
	</script>
	<div class="longer-form-field">
		<label>Date:</label>
		<b>{$url->getDate()}</b>
		<br /><br />
	</div>
	<div class="longer-form-field">
		<label>Long URL to make tiny:</label>
		<input type="text" name="longurl" value="{$url->getURL()|escape}" />
	</div>
	<div class="longer-form-field">
		<label>New custom keyword:</label>
		<input type="text" name="new_keyword" value="{$new_keyword}" /> (optional)
		<br /><br />
	</div>
	<div class="longer-form-field">
		<label>URL options:</label>
		<div class="float">
			Password protection: <input type="text" name="password" value="{$url->getPassword()|escape}" /><br />
			<input type="checkbox" name="cloak" value="1" class="no-border" {if $url->isCloak()}checked="checked" {/if}/> Cloak using a frame<br />
			<span class="cb-indent">Title: <input type="text" name="title" value="{$url->getTitle()|escape}" /></span><br />
			Maximum number of hits: <input type="text" name="maxhits" value="{$url->getMaxHits()|escape}" /><br />
			Expiration date: <input type="text" name="expiration" value="{$url->getExpiration()|escape}" readonly="readonly" /> <img class="calendar-button" src="../images/calendar.gif" alt="Pick" title="Pick" onclick="displayDatePicker('expiration', false, 'ymd', '-');" /> <img class="empty-button" src="../images/delete.gif" alt="Empty" title="Empty" onclick="document.forms[0].expiration.value = '';" /><br />
			<input type="checkbox" name="disabled" value="1" class="no-border" {if $url->isDisabled()}checked="checked" {/if}/> Disable temporarily
		</div>
		<div class="clear"></div>
	</div>
	<div class="longer-form-field">
		<label>&nbsp;</label>
		<input type="submit" name="edit_button" value="Update" />
	</div>
</form>